import {ALL_DATA, ID_DATA} from "../../action-types/homeType";

let initStates = {
    foodData: [],
    idFoodData: []
};

function home(state = initStates, action) {
    switch (action.type) {
        case ALL_DATA:
            return {
                ...state,
                foodData: action.foodData
            };

        case ID_DATA:
            return {
                ...state,
                idFoodData: action.idFoodData
            };
        default:
            return state;
    }
}

export default home;
